/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package GuiCallCenter;
import CallCenterComunicate.*;


import javax.swing.JOptionPane;

/**
 *
 * @author Tecnico-SICE
 */
public class InterfazEjecutivo extends javax.swing.JFrame {

    /**
     * Creates new form NewJFrame1
     */
    
    Cliente cli =new Cliente();
   int ban=1;
    
    private void LimpiarPantalla(){
        jTextFieldRutCliente.setText("");
        jTextFieldNombreCliente.setText("");
        jTextFieldCiudad.setText("");
        jTextFieldEmail.setText("");
        jTextFieldTelefono.setText("");
        jLabelDeudaClienteInfo.setText("");
        jComboBoxHboHd.setSelectedItem("NO");
        jComboBoxHboPlus.setSelectedItem("NO");
        jComboBoxPlanFutbol.setSelectedItem("NO");
        jComboBoxPlanInfantil.setSelectedItem("NO");
        jComboBoxCantidadDecos.setSelectedItem("0"); 
        jComboBoxPlanInternet.setSelectedItem("NO");
        jComboBoxPlanTelevision.setSelectedItem("NO");
        jComboBoxPlanVoz.setSelectedItem("NO");
        
        

    }
    
    public InterfazEjecutivo() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanelFondo = new javax.swing.JPanel();
        jLabelBienvenido = new javax.swing.JLabel();
        jLabelDatosCLiente = new javax.swing.JLabel();
        jPanelDatosDelCliente = new javax.swing.JPanel();
        jLabelRutCliente = new javax.swing.JLabel();
        jTextFieldRutCliente = new javax.swing.JTextField();
        jLabelNombreCliente = new javax.swing.JLabel();
        jTextFieldNombreCliente = new javax.swing.JTextField();
        jLabelCiudad = new javax.swing.JLabel();
        jTextFieldCiudad = new javax.swing.JTextField();
        jLabelTelefono = new javax.swing.JLabel();
        jTextFieldTelefono = new javax.swing.JTextField();
        jLabelEmail = new javax.swing.JLabel();
        jTextFieldEmail = new javax.swing.JTextField();
        jLabelDeudaCliente = new javax.swing.JLabel();
        jLabelDeudaClienteInfo = new javax.swing.JLabel();
        jLabelDatosServicios = new javax.swing.JLabel();
        jPanelDatosServicios = new javax.swing.JPanel();
        jLabelPlanVoz = new javax.swing.JLabel();
        jComboBoxPlanVoz = new javax.swing.JComboBox();
        jLabelPlanInternet = new javax.swing.JLabel();
        jComboBoxPlanInternet = new javax.swing.JComboBox();
        jLabelPlanTelevision = new javax.swing.JLabel();
        jComboBoxPlanTelevision = new javax.swing.JComboBox();
        jLabelHbohd = new javax.swing.JLabel();
        jComboBoxHboHd = new javax.swing.JComboBox();
        jLabelHboPlus = new javax.swing.JLabel();
        jComboBoxHboPlus = new javax.swing.JComboBox();
        jLabelAgregaPlan = new javax.swing.JLabel();
        jComboBoxPlanFutbol = new javax.swing.JComboBox();
        jLabelPlanInfantil = new javax.swing.JLabel();
        jComboBoxPlanInfantil = new javax.swing.JComboBox();
        jLabelPlanFutbol = new javax.swing.JLabel();
        jLabelCantidadDecos = new javax.swing.JLabel();
        jComboBoxCantidadDecos = new javax.swing.JComboBox();
        jButtonAgregarCliente = new javax.swing.JButton();
        jButtonSolicitud = new javax.swing.JButton();
        jButtonLimpiar = new javax.swing.JButton();
        jButtonModificarPlan = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanelFondo.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabelBienvenido.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Iconos/Ejecutivo.png"))); // NOI18N
        jLabelBienvenido.setText("Bienvenido Ejecutivo");

        jLabelDatosCLiente.setText("Datos del Cliente");

        jPanelDatosDelCliente.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabelRutCliente.setText("Rut Cliente");

        jTextFieldRutCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldRutClienteActionPerformed(evt);
            }
        });

        jLabelNombreCliente.setText("Nombre ");

        jLabelCiudad.setText("Ciudad");

        jLabelTelefono.setText("Telefono");

        jLabelEmail.setText("Email");

        jLabelDeudaCliente.setText("¿Cliente con Deuda?");

        javax.swing.GroupLayout jPanelDatosDelClienteLayout = new javax.swing.GroupLayout(jPanelDatosDelCliente);
        jPanelDatosDelCliente.setLayout(jPanelDatosDelClienteLayout);
        jPanelDatosDelClienteLayout.setHorizontalGroup(
            jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosDelClienteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelRutCliente)
                    .addComponent(jLabelCiudad)
                    .addComponent(jLabelEmail))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldRutCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(63, 63, 63)
                .addGroup(jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelDatosDelClienteLayout.createSequentialGroup()
                        .addComponent(jLabelDeudaCliente)
                        .addGap(27, 27, 27)
                        .addComponent(jLabelDeudaClienteInfo))
                    .addGroup(jPanelDatosDelClienteLayout.createSequentialGroup()
                        .addComponent(jLabelNombreCliente)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldNombreCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelDatosDelClienteLayout.createSequentialGroup()
                        .addComponent(jLabelTelefono)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanelDatosDelClienteLayout.setVerticalGroup(
            jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosDelClienteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelRutCliente)
                    .addComponent(jTextFieldRutCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelNombreCliente)
                    .addComponent(jTextFieldNombreCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelCiudad)
                    .addComponent(jTextFieldCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTelefono)
                    .addComponent(jTextFieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDatosDelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEmail)
                    .addComponent(jTextFieldEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelDeudaCliente)
                    .addComponent(jLabelDeudaClienteInfo))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jLabelDatosServicios.setText("Datos de servicios");

        jPanelDatosServicios.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabelPlanVoz.setText("Plan Voz");

        jComboBoxPlanVoz.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NO", "20 MINUTOS", "50 MINUTOS", "1000 MINUTOS" }));

        jLabelPlanInternet.setText("Plan Internet");

        jComboBoxPlanInternet.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NO", "5 GB", "10GB", "WEEKEND" }));

        jLabelPlanTelevision.setText("Plan Television");

        jComboBoxPlanTelevision.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NO", "BASICO", "PREMIUM" }));
        jComboBoxPlanTelevision.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxPlanTelevisionActionPerformed(evt);
            }
        });

        jLabelHbohd.setText("HBO HD");

        jComboBoxHboHd.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NO", "SI" }));
        jComboBoxHboHd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxHboHdActionPerformed(evt);
            }
        });

        jLabelHboPlus.setText("HBO PLUS");

        jComboBoxHboPlus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NO", "SI" }));

        jLabelAgregaPlan.setText("Agrega Pack Plan");

        jComboBoxPlanFutbol.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NO", "SI" }));

        jLabelPlanInfantil.setText("Plan Infantil");

        jComboBoxPlanInfantil.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NO", "SI" }));

        jLabelPlanFutbol.setText("Plan Futbol");

        jLabelCantidadDecos.setText("Cantidad Decos");

        jComboBoxCantidadDecos.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3" }));

        javax.swing.GroupLayout jPanelDatosServiciosLayout = new javax.swing.GroupLayout(jPanelDatosServicios);
        jPanelDatosServicios.setLayout(jPanelDatosServiciosLayout);
        jPanelDatosServiciosLayout.setHorizontalGroup(
            jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosServiciosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelDatosServiciosLayout.createSequentialGroup()
                        .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelPlanVoz)
                            .addComponent(jLabelPlanTelevision))
                        .addGap(47, 47, 47)
                        .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBoxPlanVoz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxPlanTelevision, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelPlanInternet)
                            .addComponent(jLabelCantidadDecos))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBoxCantidadDecos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxPlanInternet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanelDatosServiciosLayout.createSequentialGroup()
                        .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelDatosServiciosLayout.createSequentialGroup()
                                .addComponent(jLabelPlanInfantil)
                                .addGap(66, 66, 66)
                                .addComponent(jComboBoxPlanInfantil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(94, 94, 94)
                                .addComponent(jLabelPlanFutbol)
                                .addGap(31, 31, 31)
                                .addComponent(jComboBoxPlanFutbol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelDatosServiciosLayout.createSequentialGroup()
                                .addComponent(jLabelHbohd)
                                .addGap(18, 18, 18)
                                .addComponent(jComboBoxHboHd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabelHboPlus)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jComboBoxHboPlus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabelAgregaPlan))
                        .addGap(0, 0, Short.MAX_VALUE))))
        );
        jPanelDatosServiciosLayout.setVerticalGroup(
            jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosServiciosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelPlanVoz)
                    .addComponent(jComboBoxPlanVoz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelPlanInternet)
                    .addComponent(jComboBoxPlanInternet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelPlanTelevision)
                    .addComponent(jComboBoxPlanTelevision, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelCantidadDecos)
                    .addComponent(jComboBoxCantidadDecos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelHbohd)
                    .addComponent(jComboBoxHboHd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelHboPlus)
                    .addComponent(jComboBoxHboPlus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jLabelAgregaPlan)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDatosServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxPlanFutbol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelPlanInfantil)
                    .addComponent(jComboBoxPlanInfantil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelPlanFutbol))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jButtonAgregarCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Iconos/AddUsuario.png"))); // NOI18N
        jButtonAgregarCliente.setText("Agregar Cliente");
        jButtonAgregarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAgregarClienteActionPerformed(evt);
            }
        });

        jButtonSolicitud.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Iconos/user-search-icon.png"))); // NOI18N
        jButtonSolicitud.setText("Solicitud Cliente");
        jButtonSolicitud.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSolicitudActionPerformed(evt);
            }
        });

        jButtonLimpiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Iconos/Recycle-Empty-icon.png"))); // NOI18N
        jButtonLimpiar.setText("Limpiar Ventana");
        jButtonLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonLimpiarActionPerformed(evt);
            }
        });

        jButtonModificarPlan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Iconos/UserModify.png"))); // NOI18N
        jButtonModificarPlan.setText("Modificar Plan");
        jButtonModificarPlan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonModificarPlanActionPerformed(evt);
            }
        });

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Iconos/Bookmark-delete-icon.png"))); // NOI18N
        jButton1.setText("Salir");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelFondoLayout = new javax.swing.GroupLayout(jPanelFondo);
        jPanelFondo.setLayout(jPanelFondoLayout);
        jPanelFondoLayout.setHorizontalGroup(
            jPanelFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFondoLayout.createSequentialGroup()
                .addGroup(jPanelFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFondoLayout.createSequentialGroup()
                        .addGroup(jPanelFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelFondoLayout.createSequentialGroup()
                                .addGap(188, 188, 188)
                                .addComponent(jLabelBienvenido))
                            .addGroup(jPanelFondoLayout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jLabelDatosCLiente)))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanelFondoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanelFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanelDatosDelCliente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanelFondoLayout.createSequentialGroup()
                                .addComponent(jLabelDatosServicios)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(jPanelFondoLayout.createSequentialGroup()
                                .addComponent(jButtonAgregarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButtonModificarPlan)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButtonSolicitud)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jButtonLimpiar))
                            .addGroup(jPanelFondoLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(jPanelDatosServicios, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                .addContainerGap())
            .addGroup(jPanelFondoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanelFondoLayout.setVerticalGroup(
            jPanelFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFondoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelBienvenido)
                .addGap(33, 33, 33)
                .addComponent(jLabelDatosCLiente)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelDatosDelCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelDatosServicios)
                .addGap(11, 11, 11)
                .addComponent(jPanelDatosServicios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonAgregarCliente)
                    .addComponent(jButtonSolicitud)
                    .addComponent(jButtonLimpiar)
                    .addComponent(jButtonModificarPlan))
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelFondo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanelFondo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jComboBoxPlanTelevisionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxPlanTelevisionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxPlanTelevisionActionPerformed

    private void jComboBoxHboHdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxHboHdActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxHboHdActionPerformed

    private void jButtonAgregarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAgregarClienteActionPerformed
        // TODO add your handling code here:
        String Rut=jTextFieldRutCliente.getText();
        String Nombre=jTextFieldNombreCliente.getText();
        String Ciudad=jTextFieldCiudad.getText();
        String Email=jTextFieldEmail.getText();
        String Telefono=jTextFieldTelefono.getText();
        int Deco=Integer.parseInt((String)jComboBoxCantidadDecos.getSelectedItem());
//       public void NuevaPersona(String Rut, String Nombre, String Ciudad, String Voz,String Tv,String Internet,String Email,String Telefono,String Deuda,int Deco)
        cli.NuevaPersona(Rut, Nombre, Ciudad,(String)jComboBoxPlanVoz.getSelectedItem(),(String)jComboBoxPlanTelevision.getSelectedItem(),(String)jComboBoxPlanInternet.getSelectedItem(),Email, Telefono,"NO",Deco,(String)jComboBoxHboHd.getSelectedItem(),(String)jComboBoxHboPlus.getSelectedItem(),(String)jComboBoxPlanInfantil.getSelectedItem(),(String)jComboBoxPlanFutbol.getSelectedItem());
        JOptionPane.showMessageDialog(this, "USUARIO INGRESADO EXITOSAMENTE");
        LimpiarPantalla();
    }//GEN-LAST:event_jButtonAgregarClienteActionPerformed

    private void jButtonLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonLimpiarActionPerformed
        // TODO add your handling code here:
        LimpiarPantalla();
    }//GEN-LAST:event_jButtonLimpiarActionPerformed

    private void jButtonSolicitudActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSolicitudActionPerformed
        // TODO add your handling code here:
     
         
        cli=cli.buscar(jTextFieldRutCliente.getText());
        if (cli!=null){
        jTextFieldNombreCliente.setText(cli.getNombre());
        jTextFieldCiudad.setText(cli.getCiudad());
        jTextFieldTelefono.setText(cli.getTelefono());
        jTextFieldEmail.setText(cli.getEmail());
        jLabelDeudaClienteInfo.setText(cli.getDeuda());
        jComboBoxPlanVoz.setSelectedItem(cli.getVoz());
        jComboBoxPlanInternet.setSelectedItem(cli.getInternet());
        jComboBoxPlanTelevision.setSelectedItem(cli.getTv());
        jComboBoxCantidadDecos.setSelectedItem(String.valueOf(cli.getDeco()));
        jComboBoxHboHd.setSelectedItem(cli.getHboHd());
        jComboBoxHboPlus.setSelectedItem(cli.getHboPlus());
        jComboBoxPlanInfantil.setSelectedItem(cli.getPlanInfantil());
        jComboBoxPlanFutbol.setSelectedItem(cli.getPlanFutbol());
        
        

            }else {
            JOptionPane.showMessageDialog(this,"Usuario No Encontrado");
            LimpiarPantalla();
            
    }//GEN-LAST:event_jButtonSolicitudActionPerformed
      }
    
    private void jButtonModificarPlanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonModificarPlanActionPerformed
        // TODO add your handling code here:
        //String Rut,String Voz,String Tv,String Internet,int Deco,String HboHd,String HboPlus,String PlanInfantil, String PlanFutbol
      String Rut=jTextFieldRutCliente.getText();
      int Deco=Integer.parseInt((String)jComboBoxCantidadDecos.getSelectedItem());
      String deuda=jLabelDeudaClienteInfo.getText();
      if(deuda.equals("SI"))
          JOptionPane.showMessageDialog(this,"NO SE PUEDE REALIZAR LA MODIFICACIÓN DEL PLAN DEL CLIENTE YA QUE ESTE POSEE DEUDA , FAVOR INDICAR A CLIENTE REGULARIZE SITUACION");
      else
        cli.updatePersona(Rut,(String)jComboBoxPlanVoz.getSelectedItem(),(String)jComboBoxPlanTelevision.getSelectedItem(),(String)jComboBoxPlanInternet.getSelectedItem(), Deco,(String)jComboBoxHboHd.getSelectedItem(), (String)jComboBoxHboPlus.getSelectedItem(), (String)jComboBoxPlanInfantil.getSelectedItem(),(String)jComboBoxPlanFutbol.getSelectedItem());
    }//GEN-LAST:event_jButtonModificarPlanActionPerformed
    
    
    
    
    

    private void jTextFieldRutClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldRutClienteActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldRutClienteActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        Login q=new Login();
        q.show();
        hide();
    }//GEN-LAST:event_jButton1ActionPerformed


    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(InterfazEjecutivo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(InterfazEjecutivo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(InterfazEjecutivo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(InterfazEjecutivo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new InterfazEjecutivo().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButtonAgregarCliente;
    private javax.swing.JButton jButtonLimpiar;
    private javax.swing.JButton jButtonModificarPlan;
    private javax.swing.JButton jButtonSolicitud;
    private javax.swing.JComboBox jComboBoxCantidadDecos;
    private javax.swing.JComboBox jComboBoxHboHd;
    private javax.swing.JComboBox jComboBoxHboPlus;
    private javax.swing.JComboBox jComboBoxPlanFutbol;
    private javax.swing.JComboBox jComboBoxPlanInfantil;
    private javax.swing.JComboBox jComboBoxPlanInternet;
    private javax.swing.JComboBox jComboBoxPlanTelevision;
    private javax.swing.JComboBox jComboBoxPlanVoz;
    private javax.swing.JLabel jLabelAgregaPlan;
    private javax.swing.JLabel jLabelBienvenido;
    private javax.swing.JLabel jLabelCantidadDecos;
    private javax.swing.JLabel jLabelCiudad;
    private javax.swing.JLabel jLabelDatosCLiente;
    private javax.swing.JLabel jLabelDatosServicios;
    private javax.swing.JLabel jLabelDeudaCliente;
    private javax.swing.JLabel jLabelDeudaClienteInfo;
    private javax.swing.JLabel jLabelEmail;
    private javax.swing.JLabel jLabelHboPlus;
    private javax.swing.JLabel jLabelHbohd;
    private javax.swing.JLabel jLabelNombreCliente;
    private javax.swing.JLabel jLabelPlanFutbol;
    private javax.swing.JLabel jLabelPlanInfantil;
    private javax.swing.JLabel jLabelPlanInternet;
    private javax.swing.JLabel jLabelPlanTelevision;
    private javax.swing.JLabel jLabelPlanVoz;
    private javax.swing.JLabel jLabelRutCliente;
    private javax.swing.JLabel jLabelTelefono;
    private javax.swing.JPanel jPanelDatosDelCliente;
    private javax.swing.JPanel jPanelDatosServicios;
    private javax.swing.JPanel jPanelFondo;
    private javax.swing.JTextField jTextFieldCiudad;
    private javax.swing.JTextField jTextFieldEmail;
    private javax.swing.JTextField jTextFieldNombreCliente;
    private javax.swing.JTextField jTextFieldRutCliente;
    private javax.swing.JTextField jTextFieldTelefono;
    // End of variables declaration//GEN-END:variables
}
